Many websites (such as Social Networking Sites) support to share videos with others by a user with the rapid development of Internet technology, such that the user may communicate with the others through videos. Some websites define a length of the video shared by the user. If the length of the video shared by the user does not satisfy a defined length, the video shared by the user needs to be processed by the website or by the user. For example, if the length of the video uploaded by the user is defined to 10 s by a certain website and if the length of an original video is 50 s which is greater than the defined length, or if the length of the original video is 6 s which is less than the defined length, it needs to process the original video such that the length of the processed video is 10 s.
For a case that the length of the original video is greater than the defined length, a method for processing a video in the related art is to take a video satisfying the defined length starting from a preset video intercept position. For example, the preset video intercept position is a starting position of the original video, such that when the video is processed, the video satisfying the defined length is taken from the original video starting from the starting position.
For a case that the length of the original video is smaller than the defined length, a method for processing a video in the related art is to stretch the original video, so as to take a video satisfying the defined length from the original video starting from the preset video intercept position.
There are some disadvantages regarding to the methods for processing a video in the prior art. The preset video intercept position is set in advance, such that the video shared by the user needs to be taken from the original video based on the preset video intercept position, which may destroy a representation capability of the original video. As a result, content shown by the processed video is significantly different from that shown by the original video. For example, if the length of the original video is 100 s, the defined length is 10 s, and main content shown by the original video focuses on a time period 50 s˜60 s, and if a partial video having 10 s is taken from the original video starting from the starting position, the content shown by the processed video cannot show the main content of the original video.